﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Data;

using ISS.CaseStudy.DAL;
using ISS.CaseStudy.Entities;

namespace ISS.CaseStudy.BLL
{
    public class CaseStudyBLL
    {
        public static DataSet GetAll()
        {
            return CaseStudyDLL.GetAllInfos("ModifyTime", false);
        }

        public static DataSet GetAll(string orderByName, bool asc)
        {
            return CaseStudyDLL.GetAllInfos(orderByName, asc);
        }

        public static int GetCountOf(string columName)
        {
            return CaseStudyDLL.GetCountOf(columName);
        }

        public static CaseStudyInfo GetInfo(string id)
        {
            return CaseStudyDLL.GetInfo(id);
        }

        public static bool Update(CaseStudyInfo caseStudyInfo, out string errorDescription)
        {
            return CaseStudyDLL.Update(caseStudyInfo, out errorDescription);
        }

        public static bool Insert(CaseStudyInfo caseStudyInfo, out string errorDescription, out int id)
        {
            return CaseStudyDLL.Insert(caseStudyInfo, out errorDescription, out id);
        }

        public static bool Delete(string id)
        {
            return CaseStudyDLL.Delete(id);
        }

        public static DataSet GetAllOrderBy(CaseStudyOrder orderName)
        {
            return CaseStudyDLL.GetOrderedCaseStudies(orderName);
        }
    }
}
